<template>
	<view>
		<u-navbar :title="setTitle(type)" title-color="#333" title-size="34"></u-navbar>
		<view class="container">
			<view class="top">
				<view class="item">
					<view>0</view>
					<view>{{setTopTitle(type)}}</view>
				</view>
				<view class="item">
					<view>0</view>
					<view>获取转化</view>
				</view>
			</view>
			<view class="middle">
				<scroll-view scroll-y="true" class="scroll-Y">
					<view class="list" v-if="type == 1">
						<view class="item" v-for="(item,index) in list" :key="index+item" >
							<image src="../../static/img/icon_noticeLogo.png" mode=""></image>
							<view class="name">家私家纺</view>
						</view>
					</view>
					<view class="list" v-else>
						<view class="goodsItem" v-for="(item,index) in list" :key="item">
							<image src="../../static/img/face.jpg" mode=""></image>
							<view class="left">
								<view class="Ltop u-line-2">夏季连衣裙夏季连衣裙夏季连衣裙dsadasdsa夏季连衣裙夏季连衣裙夏季连衣裙夏季连衣裙夏季连衣裙</view>
								<view class="Lbottom">
									<view class="price">￥999.00</view>
									<view>+100</view>
								</view>
							</view>
						</view>
					</view>
				</scroll-view>
			</view>
		</view>
		
		<view class="btn" @click="confim(type)">{{setButton(type)}}</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 分享0  	推广1  	分享并成交2		预售新商品3	
				type: 0,
				title: '',
				list:["ss","s1","s4","s5"]
			}
		},
		methods: {

		},
		watch: {},
		onLoad(option) {
			this.type = option.type;
		},
		methods: {
			setTitle(val) {
				switch (val) {
					case '0':
						return '分享商品'
						break;
					case '1':
						return '推广'
						break;
					case '2':
						return '分享并成交'
						break;
					case '3':
						return '预售商品'
						break;
					default:
						break;
				}
			},
			setButton(val) {
				switch (val) {
					case '0':
						return '去分享'
						break;
					case '1':
						return '去推广'
						break;
					case '2':
						return '去分享'
						break;
					case '3':
						return '去预售'
						break;
					default:
						break;
				}
			},
			setTopTitle(val) {
				switch (val) {
					case '0':
						return '已分享商品'
						break;
					case '1':
						return '推广人数'
						break;
					case '2':
						return '成交商品'
						break;
					case '3':
						return '预售商品'
						break;
					default:
						break;
				}
			},
			comfim(val){
				
			}
		}
	}
</script>

<style lang="scss">
	@import './index.scss';
</style>
